<template>
    <div>
        <button @click="incrementCounter">{{counter}}</button>
        <button @click="testConsole">测试</button>
    </div>
</template>
<script>
export default {
  data() {
    return {
      counter: 0
    };
  },
  methods: {
    incrementCounter: function() {
      this.counter += 1;
      this.$emit("increment");
    },
    testConsole: function() {
      this.$emit("childTest")
    }
  }
};
</script>

